export default {
  store_friendData(state, value) {
    state.friendData = value;
  },
  store_chatList(state, value) {
    if (value instanceof Array) {
      state.chatList = value;
    } else if (typeof value == 'number') {
      state.chatList.splice(value, 1);
    } else {
      state.chatList.unshift(value);
    }
  },
  store_chatNum(state, value) {
    state.chatNum = value;
    // state.chatNum[value.chatCode] = value.count;
  },
  store_messageData(state, value) {
    state.messageData = value;
  },
  store_currentChatUser(state, value) {
    state.currentChatUser = value;
  },
  store_currentChatData(state, value) {
    if (value instanceof Array) {
      state.currentChatData = value;
    } else {
      state.currentChatData.push(value);
    }
  },
}
